Skip to content

Instantly share code, notes, and snippets.

@KarlRamstedt
KarlRamstedt / FirstPersonCameraRotation.cs
Created January 8, 2020 10:17
A simple First Person Camera rotation script for Unity.
using UnityEngine;
/// <summary>
/// A simple FPP (First Person Perspective) camera rotation script.
/// Like those found in most FPS (First Person Shooter) games.
/// </summary>
public class FirstPersonCameraRotation : MonoBehaviour {
public float Sensitivity {
get { return sensitivity; }
csrutil disable
sudo nvram boot-args="intcoproc_unrestricted=1 kext-dev-mode=1 amfi_allow_any_signature=1 amfi_unrestrict_task_for_pid=1 PE_i_can_has_debugger=1 cs_enforcement_disable=1 amfi_get_out_of_my_way=1 amfi=0xff cs_debug=1 ipc_control_port_options=0"
sudo spctl --global-disable
sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool YES
defaults write com.apple.loginwindow DisableScreenLockImmediate -bool yes
@lydonchandra
lydonchandra / LocalDB Reset
Last active May 13, 2024 18:33 — forked from hanssens/LocalDB Reset
Reset SQL's LocalDB, after corrupt rights or other problems.
# After problems with a company-wide ActiveDirectory shaker, all (local) SQL Server instances were FUBAR.
# This 'resets' the LocalDB sql instance.
sqllocaldb stop MSSQLLocalDB -k
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
@JessiG2319
JessiG2319 / hasFragileUserData.md
Created May 13, 2024 18:29 — forked from agnostic-apollo/hasFragileUserData.md
Android hasFragileUserData AndroidManifest.xml flag

The hasFragileUserData flag can be added to the application node of AndroidManifest.xml. If its value is true, then when the user uninstalls the app, a prompt will be shown to the user asking him whether to keep the app's data.

<application
	...
    android:hasFragileUserData="true" tools:targetApi="q">
...
</application>
@Aschen
Aschen / tutorial_softether_client.md
Last active May 13, 2024 18:30
Tutorial SoftEther Client (Ubuntu)

SoftEther Client

Download and install

Go to http://www.softether-download.com/files/softether and download SoftEther Client for the right architecture.

> cd /tmp
> wget http://www.softether-download.com/files/softether/v4.18-9570-rtm-2015.07.26-tree/Linux/SoftEther_VPN_Client/64bit_-_Intel_x64_or_AMD64/softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz
> tar xf softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz
@CHIZI-0618
CHIZI-0618 / PuerNya_sing-box_fakeip_client_config.jsonc
Last active May 13, 2024 18:30
sing-box 带有 Proxy Providers 的客户端配置示例
{
"log": {
"level": "info",
"output": "sing-box.log",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "cloudflare",
@AbhieSpeaks
AbhieSpeaks / dev-setup.md
Last active May 13, 2024 18:30 — forked from leodutra/-setup-windows-wsl-devenv.md
Development environment setup: Installing WSL2, Hyper, ZSH, VSCode, OhMyZsh

Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

Preview

Requirements

Steps

@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active May 13, 2024 18:30
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@Integralist
Integralist / rules for good testing.md
Last active May 13, 2024 18:25
Sandi Metz advice for writing tests

Rules for good testing

Look at the following image...

...it shows an object being tested.

You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.

@slimbuck
slimbuck / webgpu_metal_capture.txt
Created May 13, 2024 08:47
Capturing WebGPU metal trace on MacOS
1) Clone and build WebKit
git clone https://github.com/WebKit/WebKit.git WebKit
cd WebKit
Tools/Scripts/build-webkit -cmakeargs="-DENABLE_WEBGPU_BY_DEFAULT=1" --debug
2) Run your app
__XPC_METAL_CAPTURE_ENABLED=1 Tools/Scripts/run-minibrowser --debug --url http://localhost:5000/index.html#/loaders/gsplat